<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'swaps-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="help-block">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<?php echo $form->textFieldRow($model,'title',array('class'=>'span5','maxlength'=>45)); ?>

		<?php $this->widget('ext.ckeditor.CKEditorWidget',array(
		  "model"=>$model,                 # Data-Model
		  "attribute"=>'description',          # Attribute in the Data-Model
		  "defaultValue"=>"Test Text",     # Optional
		 
		  "config" => array(
			  "height"=>"400px",
			  "width"=>"100%",
			  //"toolbar"=>"basic",
			  ),
		  "ckEditor"=>Yii::app()->basePath."/../ckeditor/ckeditor.php",                             
		  "ckBasePath"=>Yii::app()->baseUrl."/ckeditor/",                   
		  ) 
	  );
	?>
	 <div class="row">
		<?php echo $form->labelEx($model, 'pictures_path'); ?>
		<?php echo $form->fileField($model, 'pictures_path'); ?>
		<?php echo $form->error($model, 'pictures_path'); ?>
    </div>
		
	<div class="row">
		<?php echo $form->labelEx($model,'valid_until'); ?>
		<?php 
		$this->widget('ext.timepicker.timepicker', array(
			'model'=>$model,
			'name'=>'valid_until',
		));
		?>
		<?php echo $form->error($model,'valid_until'); ?>
	</div>

	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? 'Create' : 'Save',
		)); ?>
	</div>

<?php $this->endWidget(); ?>
